import { Vector3 } from "@script/index";

export default class Ray3 {
  origin: Vector3;
  direction: Vector3;


  constructor(origin: Vector3, direction: Vector3) {
    this.origin = origin;
    this.direction = direction;
  }

  static light = (new Vector3(1, 1, 1)).normalize();

  point(t: number): Vector3 {
    return this.origin.add(this.direction.multiply(t));
  }
}